<?php
namespace Manage\Model;
use Think\Model;
class SettingModel extends Model{
	public function operSetting($data){

		$DpModel=M('SettingDescription');
		$DpModel->where('1=1')->delete();
		foreach($data as $language_id=>$setting){

			foreach($setting as $key => $v){
				$map=array(
					'key'	=>	$key
					);				
				$setting_id=$this->where($map)->find()['setting_id'];
				$add_data=array(
					'language_id'	=>	$language_id,
					'setting_id'	=>	$setting_id,
					'value'			=>	$v
					);
				$DpModel->add($add_data);
			}
		}
	}
}